(defadvice jka-compr-info-compress-args (around eval-args activate)
  "Evaluate program arguments"
  (setq ad-return-value (mapcar 'eval (aref info 3))))

(defadvice jka-compr-info-uncompress-args (around eval-args activate)
  "Evaluate program arguments"
  (setq ad-return-value (mapcar 'eval (aref info 6))))


(add-to-list 'jka-compr-compression-info-list ["\\.dz\\'" "7z" "7z" ("-")
                           "dz uncompress" "7z" (filename) nil t ""])

(add-to-list 'auto-mode-alist '("\\.dz\\'" nil jka-compr))

(add-to-list 'file-name-handler-alist '("\\.dz\\'" . jka-compr-handler))

(use-package flycheck
  :defer .1
  :config
  (setq-default flycheck-disabled-checkers '(golangci-lint python-flake8))
  (setq flycheck-check-syntax-automatically '(save mode-enabled)))

(use-package lsp-bridge
  :straight '(lsp-bridge :host github :repo "manateelazycat/lsp-bridge"
            :files (:defaults "*.el" "*.py" "acm" "core" "langserver" "multiserver" "resources")
            :build (:not compile))
  :bind(("M-RET" . 'lsp-bridge-code-action))
  :hook (prog-mode . global-lsp-bridge-mode)
  :init
    (setq lsp-bridge-user-langserver-dir "C:/Users/Islatan/AppData/Roaming/.emacs.d/langserver")
  :custom
  (lsp-bridge-enable-log nil)
  (lsp-bridge-enable-hover-diagnostic nil)
  ;;(lsp-bridge-enable-auto-format-code t)
  (lsp-bridge-code-action-enable-popup-menu nil)
  (lsp-bridge-enable-inlay-hint t)
  (acm-backend-lsp-show-progress t)
  :config
  (setq lsp-bridge-multi-lang-server-mode-list nil)
  (add-to-list 'lsp-bridge-single-lang-server-mode-list
        '((python-mode python-ts-mode) . "delance"))
)


;; holo-layer
;; (straight-use-package '(holo-layer
;;   :host github :repo "manateelazycat/holo-layer"
;;   :files (:defaults "*.el" "*.py" "plugin" "resources" "swaymsg-treefetch" "icon_cache")
;;   :build (:not compile)
;; ))
;; (require 'holo-layer)
;;   (setq holo-layer-enable-cursor-animation t)
;;   (setq holo-layer-enable-debug t)
;;   (holo-layer-enable)


(provide 'init-lsp-bridge)
